package com.kay.car.dao;

import com.kay.car.entity.PriceTable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.Date;
import java.util.List;

public interface PriceDao extends JpaRepository<PriceTable,Long> {
    PriceTable findOneByKeywordAndYearAndOutputAndType(String key, String year, String output, String type);

    List<PriceTable> findAllByKeywordOrderByYearDesc(String key);

    List<PriceTable> findAllByKeywordAndUpdateTimeBetweenOrderByYearDesc(String key, Date time2, Date time1);

    void deleteAllByUpdateTimeBefore(Date time1);
}
